import React, { Component} from 'react'
import * as utils from '@/utils/index.js'
import { SnackbarProvider, withSnackbar } from 'notistack';

class Notification extends Component {
	constructor(props) {
        super(props)
        this.state = {
        }
        window.$notification = this
    }
   	componentWillReceiveProps(nextProp){
    }
    show({msg="",variant="success"}){
        this.props.enqueueSnackbar(msg, { variant });
    };
	render() {
		return (
			<div className="notification">
			</div>
		)
	}
}

Notification.defaultProps = {
    msg: ''
};

const NotificationBar = withSnackbar(Notification);

function IntegrationNotistack() {
	return (
	  <SnackbarProvider maxSnack={3}>
			<NotificationBar />
	  </SnackbarProvider>
	);
}

export default IntegrationNotistack;
